<?php
/**
 * @file
 * Project-wide common include page for GreenInDeed.
 *
 * Usage:
 *  - All pages in GreenInDeed should include/require this page once and only
 *    once.
 *
 * Parameter(s):
 *  - None.
 *
 * Global variable(s) set:
 *  - None.
 *
 * Global variable(s) unset:
 *  - None.
 *
 * Exception(s):
 *  - None.
 *
 * This file includes/requires:
 *  - h_common.php
 *  - h_js_common.php
 *  - l10n.php
 */

// system ======================================================================
$PATH_EXTERNAL = "../external/";
$PATH_COMMON   = "../common/";


// header file(s) ==============================================================
require_once $PATH_COMMON . "php/h_common.php";
require_once $PATH_COMMON . "php/h_js_common.php";
require_once "l10n.php";


// constant(s) =================================================================
// debug -----------------------------------------------------------------------
//! Flag debug version.
define("APP_DEBUG", true);

// facebook --------------------------------------------------------------------
if (false == APP_DEBUG) {
  //! The application's Facebook 'API Key'.
  define("FB_APP_KEY", "843ae8a91a67d3675cc2ba8f4a6d648a");
  //! The application's Facebook 'Application Secret'.
  define("FB_APP_SECRET", "9d4e6247cecc9f2f8c91f6cd57fd3d33");
  //! The application's Facebook 'Application ID'.
  define("FB_APP_ID", "118215346334");
  //! The application's Facebook 'Canvas URL'.
  define("FB_APP_URL_CANVAS", "http://apps.facebook.com/greenindeed/");
} else {
  //! The application's Facebook 'API Key'.
  define("FB_APP_KEY", "c555ef4f900a9cdf69deaac49deaa6f2");
  //! The application's Facebook 'Application Secret'.
  define("FB_APP_SECRET", "ffdd3f6a1acb160961ffde91947e64bc");
  //! The application's Facebook 'Application ID'.
  define("FB_APP_ID", "156024026521");
  //! The application's Facebook 'Canvas URL'.
  define("FB_APP_URL_CANVAS", "http://apps.facebook.com/greenindeed_qa/");
}
//! The application's Facebook image URL.
define(
  "FB_APP_IMG",
  "http://photos-g.ak.fbcdn.net/photos-ak-sf2p/v43/50/118215346334/"
  . "app_1_118215346334_6454.gif"
);

// jquery ui -------------------------------------------------------------------
//!< Speed of jQuery effects.
define("EFFECTS_SPEED", "slow");  
//! Style for messages.
define("STYLE_MSG", "padding: 0 .7em; display: none;");
//! Style for mesage icons.
define("STYLE_MSG_ICON", "float: left; margin-right: .3em;");
//! CSS class for error message.
define("CSS_GROUP_DIV_ERR", "ui-state-error ui-corner-all");
//! Icon for error message.
define("ICON_ERR", "ui-icon ui-icon-alert");
//! CSS class for info message.
define("CSS_GROUP_DIV_INFO", "ui-state-highlight ui-corner-all");
//! Icon for info message.
define("ICON_INFO", "ui-icon ui-icon-info");


// implementation ==============================================================
// Note: P3P is supposed to declare privacy practices but this header is added
// here to prevent the application from breaking out of the iframe in IE8... Why
// it works? Ask Microsoft...
header('P3P: CP="CAO PSA OUR"');
?>
